package com.chub.study.modules.dto;

import cn.hutool.core.date.DatePattern;
import com.chub.study.modules.base.BaseVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author : chub
 * @version : V1.0.0
 * @fileName : StudInfoDTO.java
 * @description : TODO
 * @createTime : 2023-04-13 9:50
 */
@Data
public class StudInfoDTO extends BaseVO<StudInfoDTO> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "学生编号")
    private String xsbh;

    @ApiModelProperty(value = "学生姓名")
    private String xsxm;

    @ApiModelProperty(value = "学生年龄")
    private Integer xsnl;

    @ApiModelProperty(value = "学生性别 0:女 1:男")
    private String xsxb;

    @ApiModelProperty(value = "补助金额")
    private BigDecimal bzje;

    @ApiModelProperty(value = "学生班级编号")
    private String bjbh;

    @ApiModelProperty(value = "学生出生日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATE_PATTERN)
    // @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)  // 返回前端日期格式不对，这个不行
    // @JsonSerialize(using = LocalDateSerializer.class)             // 返回前端日期格式不对，这个不行
    // @JsonDeserialize(using = LocalDateDeserializer.class)         // 返回前端日期格式不对，这个不行
    private LocalDate csri;

    @ApiModelProperty(value = "学生手机号码")
    private String phone;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    private LocalDateTime cjsj;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    private LocalDateTime gxsj;
}
